﻿
namespace SharpDepend
{
    public interface IAESSecurity
    {
        /// <summary>
        /// Set the key with a given size.
        /// </summary>
        /// <param name="key">Key</param>
        /// <param name="size">Byte count.</param>
        void SetKey(string key, int size);

        /// <summary>
        /// Get or set the initialize vector.
        /// </summary>
        string InitializeVector { get; set; }

        /// <summary>
        /// Generate a random initialize vector.
        /// </summary>
        void GenerateInitializeVector(int length);

        /// <summary>
        /// Decrypt data.
        /// </summary>
        /// <param name="data">Data to decrypt.</param>
        /// <returns>Decrypted data.</returns>
        byte[] Decrypt(byte[] data);

        /// <summary>
        /// Encrypt data.
        /// </summary>
        /// <param name="data">Data to encrypt.</param>
        /// <returns>Encrypted data.</returns>
        byte[] Encrypt(byte[] data);
    }

    public interface IAESSecurityManager
    {
        IAESSecurity CreateAESSecurity();

        string GetHashSha256(string key, int size);
    }
}
